package hierarchydisplay;

import java.awt.Graphics;

import shapes.TextShape;

/* interface for nodes */ 
public interface INode {

	/* Get current shape for display */
	public TextShape getShape();

	/* Draw node */
	public void draw(Graphics g);

	/* Test if text fits in the shape */
	public boolean textFits(String text);

	/* Generate node layout */
	public void calculateLayout(int y, int stepY, int leftX, int rightX);

	/* update text */
	public void textChanged();

	/* Calculate the total number of leaves under the node (needed for layout) */
	public int getNumLeaves();

	/* set text displayed */
	public void setText(String text);
	
	/* get displayed text */
	public String getText();
}
